#pragma once

#include <QObject>
#include <QPointer>

namespace rviz_custom_plugins
{

namespace utils
{


class WidgetManager : public QObject 
{
    Q_OBJECT
public:
    static QPointer<WidgetManager> getInstance() {
        static WidgetManager manager;
        return &manager;
    }

    // display属性窗口
    static const int DISPLAY_PROPERTY_PANEL = 1;
    // 云台主摄视频窗口
    static const int GIMBAL_VIDEO_PANEL = 2;
    // 热成像视频窗口
    static const int THERMAL_VIDEO_PANEL = 3;
    // 单目全局视频窗口
    static const int GLOBAL_VIDEO_PANEL = 4;
    // 实时警告信息窗口
    static const int UAV_WARNING_PANEL = 5;
    // display对象编辑窗口
    static const int DISPLAY_EDIT_PANEL = 6;
    // 任务操作窗口
    static const int COMMAND_PANEL = 7;
    // 飞行实时状态窗口
    static const int UAV_STATUS_PANEL = 8;

    void setWidgetShow(int widgetId, bool isShow);

signals:

    void widgetShow(int widgetId, bool isShow);

private:
    WidgetManager() = default;
    Q_DISABLE_COPY(WidgetManager)  // 禁止拷贝
};


}

}
